package cn.com.jenson.web;

import cn.com.jenson.exception.TokenException;
import cn.com.jenson.system.CommonName;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class ExceptionController {
    @RequestMapping(CommonName.ERROR_CONTROLLER_PATH)
    public void handleException(HttpServletRequest request){
        throw (TokenException) request.getAttribute("filterError");
    }
}
